package com.boc.ewr.bcimp.service.impl;

import com.boc.ewr.bcimp.entity.AcctSmallUnimp;
import com.boc.ewr.bcimp.entity.SignMismatchFocusList;
import com.boc.ewr.bcimp.mapper.SignMismatchFocusListMapper;
import com.boc.ewr.bcimp.service.ISignMismatchFocusListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;

/**
 * @Description: 不符重点关注清单
 * @Author: jeecg-boot
 * @Date:   2023-04-20
 * @Version: V1.0
 */
@Service
public class SignMismatchFocusListServiceImpl extends ServiceImpl<SignMismatchFocusListMapper, SignMismatchFocusList> implements ISignMismatchFocusListService {
    @Autowired
    SignMismatchFocusListMapper signMismatchFocusListMapper;
    //批量导入
    @Transactional
    public boolean initSaveBatch(Collection<SignMismatchFocusList> entityList, Boolean flag){
        if(entityList.isEmpty() || entityList.size() == 0){
            return false;
        }
        //以最后一次导入为准，清空原数据
        if (flag) {
            signMismatchFocusListMapper.delete(null);
        }

        //保存数据
        return saveBatch(entityList, DEFAULT_BATCH_SIZE);
    }
}
